home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu023.dms
/
pu023.adf
/
TOOLS!
/
PCalc.Doc.Z
/
PCalc.Doc
Wrap
Text File
|
1988-07-08
|
11KB
|
173 lines
c
H1H
H H H H H H 2H 2H 2H 2H 2H H 9H 9H 9H 9H 9H 9H 9H 9H
H H H H H H H H 7H 7H 7H 7H 7H 7H 7H 7H7H8H
5H5H6H 7H 8H 9H 0H 1H 5H 1H 9H0H 0H 0H 0H 0H0H 6H 6H 6H 6H5H 6H 6H 7H 9H7H 7H 7H 7H 0H 0H 0H 0H 8H 4H 4H 4H 4H 4H 0H 0H 0H 0H 0H 4H 3H 3H 3H 3H 7H
0H 9H 8H 7H 6H 5H 3H 4H 9H 9H 9H 9H 9H 5H 5H 5H 5H 5H 9H 9H 9H 3H 3H 3H 3H 3H 9H 9H 9H 9H 9H 3H 3H 3H
28H 28H 28H 28H 8H 4H 24H 24H 24H 24H 0H 20H 20H 20H 20H 6H 16H 16H
1H 11H 11H 11H 11H
16H 16H
5H 6H 7H 9H 0H 4H 5H 4H
5H4H 5H 6H 9H 8H 3H 4H 3H
H H H H H H H H 3H 3H 3H 3H 3H 3H 3H 3H 3H 3H 72H 72H 72H 72H 72H 72H 72H 72H 36H 36H 36H 36H 36H 36H 36H 66H 66H 66H 42H
H H H H H H H H 2H 2H 2H 2H 2H 2H 2H 2H 2H 2H 71H 71H 71H 71H 71H 71H 71H 71H 41H 65H 65H 35H 35H 35H 35H 35H 35H 35H
42H 42H 42H 42H 42H 42H 42H 61H 61H 61H 61H 61H 61H 61H 61H 61H 1H
41H 41H 41H 41H 41H 41H 41H 60H 60H 60H 60H 60H 60H 60H 60H 60H 0H 1H
Programmer's Calculator
(PCalc)
A programmer's utility from Eggers ShareWare
Copyright
(C
) 1987 Joseph A. Eggers
All rights reserved
If you decide to keep this product, please remit the $5.00
shareware fee, otherwise, please delete or give away all copies of it.
Eggers Shareware
404 Emmet Avenue
Ferguson, MO 63135
Special Deal:
If you own another calculator from Eggers ShareWare, you may keep the
Programmer's Calculator without further remittance. Please register your
ownership though, so you will receive new product and update information.
If you do own others and you have not purchased them, why not do it now?
Registration:
If you would like to be a registered user please send $15, plus:
Your Name, Address, Product and version number
Programmer's Calculator Features:
base conversion: binary, octal, decimal, hexadecimal
bit level logic functions: AND, NOT, OR, NOR, NAND, XOR
left-shift and right-shift functions (shift one bit)
choice of working with signed or unsigned numbers
math functions, including MOD (remainder after integer division)
memory store, recall, add and subtract
keyboard or mouse operation
online help screen
Starting the calculator
Workbench: click icon.
CLI, type PCALC or RUN PCALC (include pathname if not current directory)
Ending the calculator:
1) click close window gadget at upper left
2) Select calc. window, & press ESC key
3) Select calc. window, hold down CTRL key, then press C key.
Using calculator functions
Entering numbers:
Click key representing the appropriate number.
If you are using octal numbers, the 8, 9, A, B, C, D, E, and F keys will
have no effect.
Note that there is NO indication of overflow when it occurs. If you are
interested in the fact that an overflow has occurred, you can just watch
it happen in the display.
Math functions:
Supported are addition (+), subtraction (-), multiplication (*), integer
division (/), and remainder after integer division (MOD). These all operate
like you would expect. Enter the first operand, then the math key, then the
second operand, then the equals key. The result is displayed in the selected
number base.
Bit-level logic functions:
These functions are of two kinds: those operating on two numbers, (BINARY),
and those operating on one number (UNARY).
Binary operations:
The bit level binary operations are AND, OR, XOR, NOR, and NAND. You
use these the same way as you use any of the math functions.
Unary Operations:
The bit level unary operations are NOT, left shift ( << ), and right
shift ( >> ). These operate on whatever value is in the display at
the time you do the operation. The NOT operation reverses the value of
every bit in the number, which is real obvious if you are in BIN display
mode, but not so obvious if you aren't. The shift operations shift
all the bits in the number one to the left or to the right. Bits shifted
"off the end" are lost forever. When using signed numbers, the sign bit
(high order bit) will be propagated when you shift right.
Signed and Unsigned Numbers:
Using the S and U keys you can select whether you want to use signed or
unsigned numbers. When using signed numbers, the high order bit of the
number is interpreted as a sign bit, rather than as part of the number.
A one means the number is negative, a zero means the number is positive.
This limits number size to what can be stored in 31 bits. When using signed
numbers, the sign bit will be propagated when you shift right.
When using unsigned numbers, all 32 bits are used to store the number, which
then must always be positive. Using the high order bit in the number allows
a value to be stored that is twice as large as the largest number that can
be stored as a signed number. One of the S or the U keys will be high-
lighted to show you whether you are using signed or unsigned numbers. The
highlighted key's text will be in a different color than the numeric keys
on the calculator.
Numeric base conversions:
The calculator can work in any of four numeric bases: base 2 (binary),
base 8 (octal), base 10 (decimal), and base 16 (hexadecimal). Converting
between the bases is accomplished by clicking on the key representing the
base you want to work in. The base you are in determines which of the
numeric keys are usable. If you are in base 2 for instance, none of the
numeric keys higher than 1 are usable, because only the digits 0 and 1 are
meaningful in base 2. The key for the numeric base you are working in is
displayed in a different color than the others.
The calculator's memory:
The calculator has a single memory where you can store a value for later
recall or for calculations while it is still in memory. A number is stored
in memory by pressing the M key. Whatever value is displayed currently
will be copied into memory. Whenever memory has something in it, the M key
will be highlighted to tell you it's there.
A number is recalled from memory by pressing the MR key. Whatever value
was in memory is copied to the display, and the value in the display is
lost. The value that was in memory stays in memory.
To add or subtract the value in the display with the value in the memory,
press the M+ or M- key. The result of the operation will be stored the
memory, and the display value will not change.
To clear the memory, press M when there is a zero in the display.
The Clear keys:
To clear the last value entered, press the CE key. To clear everything in
the calculator except the memory, press the CA key.
Changing the sign of the display:
To change the sign of the value in the display, press the +- key. If you
are using unsigned numbers, this key has no effect. Note that when you
in decimal mode, the change of sign is indicated by the presence or absence
of the negative sign to the left of the number, but when you are using a
different numeric base the change in sign is indicated by flipping the
high order sign bit and then propagating it.
Getting Help:
Pressing the HELP key will display a window showing the keys on the
keyboard that you can use as alternatives to the calculator keys. You can
leave this window displayed while you continue to use the calculator.
To close the help window, use its close window gadget.
Using the keyboard with the calculator:
All of the keys on the calculator can be pressed using mouse or keyboard key.
The following table shows which keyboard keys relate to which calculator
keys. This info. is also available from the help screen. In general, most
keys with a single character can be pressed by the same key on the keyboard.
CALCULATOR KEYBOARD
------------------------
0 - F 0 - F
= =, RETURN, or ENTER
+, -, /, * +, -, /, *
S S
U U
MOD %
<< <
>> >
BIN CTRL-B the up and down arrow keys can also
OCT CTRL-O be used to go from one numeric base
DEC CTRL-D to another.
HEX CTRL-H
AND &
OR |
NOT !
XOR X
NAND #
NOR $
About ?
M M
MR R
M+ [
M- ]
+- P
CA K (think of "K"ill)
C DEL
quit PCALC ESC or CTRL-C
HELP HELP
CLICK CLOSE GADGET, OR USE CTRL-C OR CTRL-D TO EXIT